<div class="pageContent">
	<form method="post" action="admin/merch/add" class="pageForm required-validate" enctype="multipart/form-data" onsubmit="return iframeCallback(this, navTabAjaxDone);">
		<div class="pageFormContent " layoutH="56">
			<p>
				<label>商户编号：</label>
				<input type="text"value="系统自动生成" readonly="readonly" size="30"/>
			</p>
			<p>
				<label>商户名：</label>
				<input name="item.name" type="text" size="30" class="required"/>
			</p>
			<p>
				<label>所属机构：</label>
				<input type="hidden" name="item.orgCode" value=""/>
				<input type="text" name="item.orgName" class="required" size="28"  suggestFields="orgCode,orgName" readonly="readonly" />
				<a class="btnLook" href="admin/org/lookup" lookupGroup="item">查找带回</a>	
			</p>
			
			<p>
				<label>交易币种：</label>
				<input name="item.cointype" value="CNY"  type="text" size="30" />
			</p>
			
			<p>
				<label>联系人：</label>
				<input name="item.contacts" type="text" size="30" />
			</p>
			<p>
				<label>联系电话：</label>
				<input  type="text" name="item.contactsPhoneNo" size="30"  />
			</p>
			<p>
				<label>联系地址：</label>
				<input  type="text" name="item.address" size="30"  />
			</p>
			<p>
				<label>法定代表人：</label>
				<input  type="text" name="item.legalPerson" size="30"  />
			</p>
			<p>
				<label>法定代表人证件号：</label>
				<input  type="text" name="item.certsNo" size="30"  />
			</p>
			<div class="divider"></div>
				<label>商户文件1：</label>
				<ul id="upload-preview" class="upload-preview"></ul>
				<div class="upload-wrap" rel="#upload-preview">
					<input type="file" name="file2"  onchange="filefujianChange(this);" accept="image/*" multiple="multiple">
				</div>
				
			<div class="divider"></div>
				<label>商户文件2：</label>
				<ul id="upload-preview1" class="upload-preview1"></ul>
				<div class="upload-wrap" rel="#upload-preview1">
					<input type="file" name="file1" onchange="filefujianChange(this);" accept="image/*" multiple="multiple">
				</div>
				
			<div class="divider"></div>
				<label>商户文件3：</label>
				<ul id="upload-preview2" class="upload-preview2"></ul>
				<div class="upload-wrap" rel="#upload-preview2">
					<input type="file" name="file3" onchange="filefujianChange(this);" accept="image/*" multiple="multiple">
				</div>
				
				<div class="divider"></div>
				<label>商户文件4：</label>
				<ul id="upload-preview3" class="upload-preview3"></ul>
				<div class="upload-wrap" rel="#upload-preview3">
					<input type="file" name="file3" onchange="filefujianChange(this);" accept="image/*" multiple="multiple">
				</div>
				
				<div class="divider"></div>
				<label>商户文件5：</label>
				<ul id="upload-preview4" class="upload-preview4"></ul>
				<div class="upload-wrap" rel="#upload-preview4">
					<input type="file" name="file3" onchange="filefujianChange(this);" accept="image/*" multiple="multiple">
				</div>
				
				<div class="divider"></div>
				<label>商户文件6：</label>
				<ul id="upload-preview5" class="upload-preview5"></ul>
				<div class="upload-wrap" rel="#upload-preview5">
					<input type="file" name="file3" onchange="filefujianChange(this);" accept="image/*" multiple="multiple">
				</div>
				
				
				<div class="divider"></div>
				<label>商户文件7：</label>
				<ul id="upload-preview6" class="upload-preview6"></ul>
				<div class="upload-wrap" rel="#upload-preview6">
					<input type="file" name="file3" onchange="filefujianChange(this);" accept="image/*" multiple="multiple">
				</div>
				
				
				<div class="divider"></div>
				<label>商户文件8：</label>
				<ul id="upload-preview7" class="upload-preview7"></ul>
				<div class="upload-wrap" rel="#upload-preview7">
					<input type="file" name="file3" onchange="filefujianChange(this);" accept="image/*" multiple="multiple">
				</div>
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
	
	<script type="text/javascript">
	var isIE = /msie/i.test(navigator.userAgent.toLowerCase()) && !window.opera; 
	function filefujianChange(target) {
	       var fileSize = 0;         
	       if (isIE && !target.files) {     
	         var filePath = target.value;     
	         var fileSystem = new ActiveXObject("Scripting.FileSystemObject");        
	         var file = fileSystem.GetFile (filePath);     
	         fileSize = file.Size;    
	       } else {    
	        fileSize = target.files[0].size;     
	        }   
	        var size = fileSize / 1024;    
	        if(size>4000){  
	         alert("附件不能大于4M");
	         target.value="";
	         return
	        }
	        var name=target.value;
	        var fileName = name.substring(name.lastIndexOf(".")+1).toLowerCase();
	        if(fileName !="jpg" && fileName !="jpeg" && fileName !="pdf" && fileName !="png" && fileName !="dwg" && fileName !="gif" ){
	          alert("请选择图片格式文件上传(jpg,png,gif,dwg,pdf,gif等)！");
	            target.value="";
	            return
	        }
	      }
	</script>
	
	
</div>
